﻿using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace FPC.Offer.UI.GeneralProcessor.SkyDriveHand
{

    /// <summary>
    /// NetTrayshowHandler 的摘要说明
    /// </summary>
    public class NetTrayshowHandler : IHttpHandler
    {
        FPC.Offer.Service.System_NetTrayTableService Sky = new Service.System_NetTrayTableService();

        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            var FName = context.Request["name"];
            var NetState = 1;
            List<Model.Dropbox_NetTray> a = Sky.Find(w => w.FName == FName && w.NetState == NetState).ToList();

            context.Response.Write(JsonConvert.SerializeObject(a.ToList()));
            //List<Model.Dropbox_NetTray> list = Sky.Select();
            //context.Response.Write(list);


        }

        public bool IsReusable
        {
            get
            {
                return false;
            }
        }
    }
}